home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The PC-SIG Library 10
/
The PC-Sig Library - Shareware for the IBM PC and Compatibles (PC-SIG)(Tenth Edition Disks 1-2804)(1991).iso
/
PC_SIGCD
/
20
/
9
/
DISK2092.ZIP
/
RBBS-LIT.ZIP
/
LIT
/
VARCBAS.LIT
< prev
next >
Wrap
Text File
|
1989-07-25
|
2KB
|
61 lines
*[VARCBAS.LIT]****************************************************************
* Description: Forces BASIC routines to view archive contents. *
* RBBS-PC Level: CPC17.2B *
* Module Affected: RBBSSUB4.BAS *
* Selection Option: ASMVIEWARC = OFF *
* Additional files: None *
******************************************************************************
64600 SUB VIEWARC STATIC
CLOSE 2
IF SHARE.IT THEN _
OPEN FILE.NAME$ FOR RANDOM SHARED AS #2 LEN=1 _
ELSE OPEN "R",2,FILE.NAME$,1
FIELD 2,1 AS CHAR$
BYTE.POINTER! = 1
ARC.END! = LOF(2)
64605 IF BYTE.POINTER! > ARC.END! THEN _
GOTO 64620
GET 2,BYTE.POINTER!
IF CHAR$ <> CHR$(26) THEN _
GOTO 64620
BYTE.POINTER! = BYTE.POINTER! + 1
GET 2,BYTE.POINTER!
IF CHAR$ = CHR$(0) THEN _
GOTO 64620
ARCED.NAME$ = ""
FOR X = 1 TO 12
GET 2,BYTE.POINTER! + X
IF CHAR$ < CHR$(40) THEN _
GOTO 64610
ARCED.NAME$ = ARCED.NAME$ + _
CHAR$
NEXT
64610 A$ = ARCED.NAME$
BYTE.POINTER! = BYTE.POINTER! + 14
GOSUB 64630
TOTAL.BYTES# = WORK.BYTES#
BYTE.POINTER! = BYTE.POINTER! + 10
GOSUB 64630
FINAL.BYTES# = WORK.BYTES#
A$ = A$ + _
SPACE$(20 - LEN(ARCED.NAME$) - LEN(STR$(FINAL.BYTES#))) + _
STR$(FINAL.BYTES#) + _
" bytes."
CALL QTPUT1 (A$)
BYTE.POINTER! = BYTE.POINTER! + TOTAL.BYTES# + 4
GOTO 64605
64620 CLOSE 2
SUBROUTINE.PARAMETER = 0
CALL CARRIER
A$ = ""
EXIT SUB
64630 FACTOR# = 1#
WORK.BYTES# = 0
FOR X = 0 TO 3
GET 2,BYTE.POINTER! + X
WORK.BYTES# = WORK.BYTES# + FACTOR# * ASC(CHAR$)
FACTOR# = FACTOR# * 256#
NEXT
RETURN
END SUB